<%@ page import="com.gl.multipleyes.User" %>



<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'externalId', 'error')} required">
	<label for="externalId">
		<g:message code="user.externalId.label" default="External Id" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="externalId" required="" value="${userInstance?.externalId}"/>

</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="user.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${userInstance?.name}"/>

</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'externalToken', 'error')} ">
	<label for="externalToken">
		<g:message code="user.externalToken.label" default="External Token" />
		
	</label>
	<g:textField name="externalToken" value="${userInstance?.externalToken}"/>

</div>

<div class="fieldcontain ${hasErrors(bean: userInstance, field: 'invitations', 'error')} ">
	<label for="invitations">
		<g:message code="user.invitations.label" default="Invitations" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${userInstance?.invitations?}" var="i">
    <li><g:link controller="invitation" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="invitation" action="create" params="['user.id': userInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'invitation.label', default: 'Invitation')])}</g:link>
</li>
</ul>


</div>

